﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HRMDomain;

namespace HRMDataAccess
{
    public class DropCreateDatabaseIfModelChangesWithSeed : DropCreateDatabaseIfModelChanges<HRMDataContext>
    {
        protected override void Seed(HRMDataContext context)
        {
            context.AbsenceStageTypes.Add(new AbsenceStageType { Name = "Initial", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });
            context.AbsenceStageTypes.Add(new AbsenceStageType { Name = "Periodic Review", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });
            context.AbsenceStageTypes.Add(new AbsenceStageType { Name = "Final Warning", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });

            context.EmployeeClassTypes.Add(new EmployeeClassType { Name = "Stores", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });
            context.EmployeeClassTypes.Add(new EmployeeClassType { Name = "Admin", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });
            context.EmployeeClassTypes.Add(new EmployeeClassType { Name = "Sales", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });

            context.FeedbackCategories.Add(new FeedbackCategory { Name = "Compliment", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });
            context.FeedbackCategories.Add(new FeedbackCategory { Name = "Complaint", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });

            context.InjuryCategories.Add(new InjuryCategory { Name = "Lost Time Injury", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });
            context.InjuryCategories.Add(new InjuryCategory { Name = "Non Lost Time Injury", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });

            context.InjuryTypes.Add(new InjuryType { Name = "Physical", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });
            context.InjuryTypes.Add(new InjuryType { Name = "Psychological", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });

        }
    }

    public class DropCreateDatabaseWithSeed : DropCreateDatabaseAlways<HRMDataContext>
    {
        protected override void Seed(HRMDataContext context)
        {
            context.AbsenceStageTypes.Add(new AbsenceStageType { Name = "Initial", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });
            context.AbsenceStageTypes.Add(new AbsenceStageType { Name = "Periodic Review", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });
            context.AbsenceStageTypes.Add(new AbsenceStageType { Name = "Final Warning", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });

            context.EmployeeClassTypes.Add(new EmployeeClassType { Name = "Stores", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });
            context.EmployeeClassTypes.Add(new EmployeeClassType { Name = "Admin", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });
            context.EmployeeClassTypes.Add(new EmployeeClassType { Name = "Sales", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });

            context.FeedbackCategories.Add(new FeedbackCategory { Name = "Compliment", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });
            context.FeedbackCategories.Add(new FeedbackCategory { Name = "Complaint", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });

            context.InjuryCategories.Add(new InjuryCategory { Name = "Lost Time Injury", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });
            context.InjuryCategories.Add(new InjuryCategory { Name = "Non Lost Time Injury", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });

            context.InjuryTypes.Add(new InjuryType { Name = "Physical", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });
            context.InjuryTypes.Add(new InjuryType { Name = "Psychological", CreatedBy = "SYSTEM", CreatedOn = DateTime.Now });

        }
    }
}
